<template>
  <div id="app">
  	<transition :name="pageDirection">
	     <router-view  class="child-view"></router-view>
	  </transition>
  </div>
</template>

<script>
import {mapState, mapMutations} from 'vuex';

export default {
  name: 'app',
  computed:{
    ...mapState([
      'pageDirection'
    ])
  }
}
</script>

<style>
.child-view {
  position: absolute;
  width:100%;
  transition: all .5s cubic-bezier(.55,0,.1,1);
}
.fade-enter-active, .fade-leave-active {
  transition: opacity .5s
}
.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {
  opacity: 0
}

.slide-left-enter, .slide-right-leave-active {
  opacity: 0;
  -webkit-transform: translate(50px, 0);
  transform: translate(50px, 0);
}
.slide-left-leave-active, .slide-right-enter {
  opacity: 0;
  -webkit-transform: translate(-50px, 0);
  transform: translate(-50px, 0);
}
</style>
